<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>stars</title>
    <link rel="shortcut icon" href="../assets/icon.ico" type="image/x-icon">
    <link rel="stylesheet" href="../css/public.css">
</head>

<body>
    <h1>229970924 宋浩然</h1>
    <script>

        let rows = prompt("请输入行数");

        for (var i = 1; i <= rows; i++) {
            for (var j = i; j <= rows; j++) {
                document.write("\xa0");
            }
            for (var k = 1; k <= i; k++) {
                document.write("*\n");
            }
            document.write("<br/>")
        }

        for (var i = 1; i <= rows; i++) {
            for (var j = i; j <= rows; j++) {
                document.write("\xa0");
            }
            for (var k = 1; k <= rows; k++) {
                document.write("*\n");
            }
            document.write("<br/>")
        }
    </script>
</body>

</html>